<?php
declare (strict_types=1);

namespace app\model\system;

use think\Model;

/**
 * @mixin \think\Model
 */
class SystemRule extends Model
{
    //
    protected $autoWriteTimestamp = true;
    protected $createTime = 'c_time';
    protected $updateTime = 'u_time';

    public function getInfo($where, $field = '*')
    {
        return $this->where($where)
            ->hidden(['c_time','u_time'])
            ->field($field)
            ->find();
    }

    public function getList($where, $field = '*', $order = 'sort desc')
    {
        return $this->where($where)
            ->hidden(['c_time','u_time'])
            ->field($field)
            ->order($order)
            ->select();
    }
}


